﻿<%@ Page Title="Quản lý thông tin khách hàng" Language="vb" AutoEventWireup="false" MasterPageFile="~/Master/InSite.Master" CodeBehind="CustomerManager.aspx.vb" Inherits="Core.CustomerManager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<fieldset style="margin: 0 auto;">
    <legend>Thông tin</legend>
    <table width="100%" border="1">
        <tr>
            <td>
                <table width="100%">
                    <tr>
                        <td style="width:100px; color: #666666;">
                            User name:
                        </td>
                        <td>
                            <asp:TextBox ID="txtUsername" class="mediumfield" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; color: #666666;">
                            Số điện thoại:
                        </td>
                        <td>
                            <asp:TextBox ID="txtPhone" class="mediumfield" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                        <td style="width:100px; color: #666666;">
                            Email:
                        </td>
                        <td>
                            <asp:TextBox ID="txtEmail" class="mediumfield" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                        <td style="width:100px; color: #666666;">
                            Địa chỉ:
                        </td>
                        <td>
                            <asp:TextBox ID="txtAddress" class="mediumfield" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                <table width="100%">
                    <tr>
                        <td style="width:100px; color: #666666;">
                            Tên đầy đủ:
                        </td>
                        <td>
                            <asp:TextBox ID="txtFullname" class="mediumfield" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; color: #666666;">
                            Số CMND:
                        </td>
                        <td>
                            <asp:TextBox ID="txtIdentity" class="mediumfield" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                     <tr>
                        <td style="width:100px; color: #666666;">
                            Trạng thái:
                        </td>
                        <td>
                            <asp:DropDownList ID="cbxStatus" runat="server" CssClass="centerCbx" Width="218px"></asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" class="button" Height="26px" style="float:none"/>
                
            </td>
        </tr>
    </table>   
</fieldset>
       <br />
<fieldset>
    <legend>Danh sách người dùng</legend>
    <asp:SqlDataSource ID="dsSource" runat="server"></asp:SqlDataSource>
    <asp:GridView ID="gridMenu" runat="server" DataSourceID="dsSource" class="tblMain" 
            AutoGenerateColumns="false" GridLines="None" AllowPaging="True" 
            PageSize="10" AllowSorting="True" DataKeyNames="CusID" HeaderStyle-BackColor="#9097a9">
        <Columns>
                <asp:TemplateField HeaderText="No.">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text="<%#Container.DataItemIndex + 1%>"></asp:Label>
                        <asp:Label ID="Label2" runat="server" Visible="false" Text='<%#Eval("CusID") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Width="20px" HorizontalAlign="Center" />
                    <ItemStyle Width="20px" HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField HeaderText="Tài khoản" DataField="CusUserName" 
                    SortExpression="CusUserName" >
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Tên đầy đủ">
                    <ItemTemplate>
                        <asp:Label ID="lblFullName" runat="server" Text='<%#Eval("CusFullName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="Email" DataField="CusEmail" 
                    SortExpression="CusEmail" >
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Địa chỉ" SortExpression="CusAddress">
                    <ItemTemplate>
                        <asp:Label ID="lblAddress" runat="server" Text='<%#Eval("CusAddress") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Trạng thái">
                    <ItemTemplate>
                        <asp:Label ID="lbGroupName" runat="server" Text='<%#getUserStt(Eval("CusStatus")) %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Width="100px" HorizontalAlign="Left" />
                    <ItemStyle Width="100px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete" ShowHeader="False" HeaderStyle-HorizontalAlign="Left" ItemStyle-Width="100"> 
                    <ItemTemplate> 
                        <asp:ImageButton ID="butDelete" runat="server" CausesValidation="False" CommandName="Delete" ImageUrl="~/static/inSite/images/recycle.png" CssClass="noneCSS" OnClientClick="return confirm('Bạn có chắc muốn xóa tài khoản này không?');"/>
                    </ItemTemplate> 
                    <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                    <ItemStyle Width="50px"></ItemStyle>
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="Chi tiết">
                    <ItemTemplate>
                        <asp:Label ID="lbPms" runat="server" Text='<%#getUserEditLink(Eval("CusID")) %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Width="70px" HorizontalAlign="Left" />
                    <ItemStyle Width="70px" />
                </asp:TemplateField>
        </Columns>
        <PagerStyle HorizontalAlign="Center" />
    </asp:GridView>
  </fieldset>
</asp:Content>
